﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LINQToolKit
{
    [global::System.Serializable]
    public class RequestException : ApplicationException
    {
        public int StatusCode { get; set; }

        public RequestException(RequestResult result)
            : base(result.Message, result.Error)
        {
            this.StatusCode = result.StatusCode;
        }

        public RequestException() { }
        public RequestException(string message) : base(message) { }
        public RequestException(string message, Exception inner) : base(message, inner) { }
        protected RequestException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context) { }
    }
}
